App.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', 'RouteHelpersProvider',
    function ($stateProvider, $locationProvider, $urlRouterProvider, helper) {
        'use strict';

        $stateProvider
            .state('app.user', {
                url: '/user',
                title: '用户管理',
                templateUrl: helper.basepath('user/user.html')
            })
            .state('app.user.add', {
                url: '/add',
                title: '增加用户',
                templateUrl: helper.basepath('user/add_user.html'),
                resolve: helper.resolveFor('ui.select', 'taginput', 'inputmask', 'localytics.directives')
            })
            .state('app.user.update', {
                url: '/update/:userId',
                title: '更新用户',
                templateUrl: helper.basepath('user/update_user.html'),
                resolve: helper.resolveFor('ui.select', 'taginput', 'inputmask', 'localytics.directives')
            })
            .state('app.user.query', {
                url: '/query',
                title: '查询用户',
                templateUrl: helper.basepath('user/query_user.html'),
                resolve: helper.resolveFor('ui.grid', 'ngDialog')
            })
            .state('app.user.view', {
                url: '/view/:userId',
                title: '查看用户',
                templateUrl: helper.basepath('user/view_user.html'),
                resolve: helper.resolveFor('ui.select', 'taginput', 'inputmask', 'localytics.directives')
            })
        ;

    }]);